<style type="text/css">
	.pagetitle input{
		float:right; 
		width:9.0em; 
		margin-right:20px; 
		/*padding:1px !important /*Non-IE6*/;
		padding:0 /*IE6*/; 
		background:rgb(230,230,230); 
		border:solid 1px rgb(150,150,150); 
		text-align:center; 
		font-family:verdana,arial,sans-serif; 
		color:rgb(150,150,150); 
		font-size:50%;
	}
	
	.pagetitle input:hover{
		cursor: pointer;
		border:solid 1px rgb(80,80,80); 
		background:rgb(220,220,220); 
		color:rgb(80,80,80);
	}
</style>
<h1 class="pagetitle">
	<span id="patient-name">
	<?php 
		if ($id_patient) $title = "Edici&oacute;n de Paciente : $fullname";	else $title = "Nuevo Paciente";
		echo $title;	
	?>
	</span>
	<input type="button" id="btnBackToList" name="btnBackToList" value="Volver al listado" />
</h1>
<div class="column1-unit">
	<?php echo $actions;?>
</div>
<script type="text/javascript">
	var PatientWidget = (function(){
		var editing = false;
			
		return {
			init : function(patient_id){
				editing = (patient_id) ? true : false;
				if (!editing) this.disableActions(); 
				$j("#btnBackToList").click(this.backToList);
			},
			isEditing : function(){
				return editing;
			},
			enableActions : function(id){

				$j("div.tabs li a").each(function(index){
					var oldHref = $j(this).attr("href");
					$j(this).attr("href", oldHref + id);
				});
								
				$j("div.tabs li").show('slow');
			},
			disableActions : function(){
				$j("div.tabs li").hide('fast');
				$j("div.tabs li.current").show("fast");
			},
			setEditing : function(is_editing){
				editing = is_editing;
				return;
			},	
			updatePatientHeader: function(patient_name){
				$j("#patient-name").text("Edición de Paciente: " + patient_name);
				return false;
			},
			backToList : function(){
				Diastole.loadSection("patient","div.main-content");
			}
		};
	}());
	$j(document).ready(function(){	PatientWidget.init(<?php echo $id_patient;?>); });
</script>